package cn.ad.interceptor;

/**
 * @author dongbin.yu
 * @from 2016-04-05
 * @since V1.0
 */
public class PageParameter {

    private int currentPage = 1;

    private int pageSize = 15;

    private int totalPage;

    private int totalCount;

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

	/* 
	 * @see java.lang.Object#toString() 
	 */
	@Override
	public String toString() {
		return "PageParameter [currentPage=" + currentPage + ", pageSize="
				+ pageSize + ", totalPage=" + totalPage + ", totalCount="
				+ totalCount + "]";
	}

	public PageParameter(int offset, int pageSize) {
		super();
		this.currentPage = offset/pageSize+1;
		this.pageSize = pageSize;
	}

	public PageParameter() {
		super();
	}

	
	
}
